#ifndef AUDIO_OUT_H
#define AUDIO_OUT_H

#include <windows.h>
#include <mmsystem.h>

int AudioInit(int channels, int Hz, ClientInterface* pclient);
int Audio_Play(void* buffer,int size, ClientInterface* pclient);
int Audio_Close();


//--------------internal -----------------------


void Real_PlayWait(int n);
void DisplayMMError(int err, ClientInterface* pclient);
void MarkHeaderUsed(int i);
void MarkHeaderUnused(WAVEHDR* hdr);
void CleanupUnusedHeader();
int  GetBytesInPlayMode();
void CALLBACK Real_PlayBack( HWAVEOUT hwo,UINT uMsg,DWORD dwInstance,
							DWORD dwParam1,DWORD dwParam2);

#endif
